Auth Token

The /actions/authToken URL enables the retrieval of an authentication token that may be used to access device’s Web interface without need to enter a username and a password. The generated authentication token has a limited lifetime and should be used within ten seconds after generation. To use the token, append it to the device’s URL as authToken parameter:

http://10.3.4.10/index.html?mode=web&authToken=4675cd93ab9f80f45a4ec0a934f81097 

URL

/api/v1/actions/authToken

HTTP Method

POST

Supported Request JSON Attributes

Attribute

Type

Value

Description

username

String

 

Username for new session (used for activity logging and graphical display).

privLevel

String

admin

operator

monitor

Privilege level for new session.

admin: Security Administrator user
operator: Operator with administrative privileges (can alter configuration)
monitor: Monitor user (can only view configuration)

sessionTimeout

Integer

 

(Optional) Session timeout in seconds.

crossHost

String

 

(Optional) IP address or hostname of third-party Web interface that integrates the device’s Web interface through IFRAME directive. This is required to prevent cross-site request forgery (CSRF) attacks.

HTTP Response

200 OK

Example

Request:
POST /api/v1/actions/authToken HTTP/1.1
Host: 10.4.219.229
Content-Type: application/json
{
    "username": "john",
    "privLevel": "admin",
    "sessionTimeout": 180,
    "crossHost": "10.3.2.40"
} 
Response:
HTTP/1.1 200 OK
Content-Type: application/json
{
    "authToken": "4675cd93ab9f80f45a4ec0a934f81097",
    "description": "Authentication token successfully generated"
}